/**
 * 
 */
package ar.edu.unq.tpi.uis.tepe3.dominio;

import java.util.HashSet;
import java.util.Set;


/**
 * @author daniel
 *
 */
public class User extends Grantable {

	private String pass;
	private Set<Group> groups;
	
	public User(){
		super();
		//this.groups = new HashSet<Group>();
	}
	
	public User(String name){
		this();
		this.setName(name);
	}
	
	public User(String aName, String aPass) {
		this(aName);
		this.setPass(aPass);
	}
	
	public void setPass(String pass) {
		this.pass = pass;
	}

	public String getPass() {
		return pass;
	}

	public Set<Group> getGroups() {
		return groups;
	}

	public void setGroups(Set<Group> groups) {
		this.groups = groups;
	}
	
	public void addGroup(Group group){
		this.groups.add(group);
	}
	
	public String toString(){
		return this.getName();
	}
}
